package com.mysoft.gfyx.marketdevelop.controller;

import com.mysoft.framework.context.api.ContextManager;
import com.mysoft.framework.rpc.annotation.PubAction;
import com.mysoft.framework.rpc.annotation.PubService;
import com.mysoft.framework.rpc.contants.RequestPrefix;
import com.mysoft.gfyx.marketdevelop.controller.dto.*;
import com.mysoft.gfyx.marketdevelop.service.ProjectService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMethod;

@PubService(value = "/projectDataApi", prefix = RequestPrefix.API)
@Tag(name = "在建项目资料-API")
public class MohurdProjectDataApiController {

    @Autowired
    private ProjectService projectService;

    @Autowired
    private ContextManager contextManager;

    @PubAction(value = "/getProjectMainData", method = RequestMethod.POST)
    public Object getProjectMainData(@RequestBody GetDetailDataRequestDto dto) {
        return projectService.getProjectMainData(dto.getId());
    }

    @PubAction(value = "/getProjectContactDetail", method = RequestMethod.POST)
    public Object getProjectContactDetail(@RequestBody GetProjectContactDetailRequestDto dto) {
        return projectService.getProjectContactDetail(dto);
    }
}
